home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
nrpas13.arc
/
ZBRAC.DEM
< prev
next >
Wrap
Text File
|
1991-05-01
|
619b
|
32 lines
PROGRAM d9r2(input,output);
(* driver for routine ZBRAC *)
VAR
succes : boolean;
i : integer;
x1,x2 : real;
(*$I MODFILE.PAS *)
(*$I BESSJ0.PAS *)
FUNCTION fx(x: real): real;
BEGIN
fx := bessj0(x)
END;
(*$I ZBRAC.PAS *)
BEGIN
writeln('bracketing values:':21,'function values:':23);
writeln('x1':6,'x2':10,
'bessj0(x1)':21,'bessj0(x2)':12);
FOR i := 1 to 10 DO BEGIN
x1 := i;
x2 := x1+1.0;
zbrac(x1,x2,succes);
IF (succes) THEN BEGIN
writeln(x1:7:2,x2:10:2,' ':7,
fx(x1):12:6,fx(x2):12:6)
END
END
END.